package com.androidx.p013lv.invention.view;

import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.androidx.p013lv.base.bean.InventionBean;
import com.androidx.p013lv.base.bean.VideoBean;
import com.androidx.p013lv.base.listener.ItemClickListener;
import com.androidx.p013lv.base.p015ui.LazyFragment;
import com.androidx.p013lv.invention.C1069R;
import com.androidx.p013lv.invention.OnInventionType;
import com.androidx.p013lv.invention.adapter.AdapterInvention;

/* renamed from: com.androidx.lv.invention.view.ThirteenView */
public class ThirteenView extends BaseView {
    AdapterInvention adapter;
    LinearLayout btn_more;
    LinearLayout btn_swap;
    RecyclerView recycler;
    TextView tv_title;

    public ThirteenView(View view, Fragment fragment, String str, OnInventionType onInventionType) {
        super(view, fragment, str, onInventionType);
        this.tv_title = (TextView) view.findViewById(C1069R.C1072id.tv_title);
        this.recycler = (RecyclerView) view.findViewById(C1069R.C1072id.recycler);
        this.btn_more = (LinearLayout) view.findViewById(C1069R.C1072id.btn_more);
        this.btn_swap = (LinearLayout) view.findViewById(C1069R.C1072id.btn_swap);
    }

    @Override // com.androidx.p013lv.invention.view.BaseView
    public void setView(InventionBean inventionBean, int i) {
        super.setView(inventionBean, i);
        this.tv_title.setText(this.inventionBean.getStationName());
        this.btn_more.setOnClickListener(new View.OnClickListener() {
            /* class com.androidx.p013lv.invention.view.ThirteenView.View$OnClickListenerC11821 */

            public void onClick(View view) {
                ThirteenView.this.onInventionType.onClick(ThirteenView.this.inventionBean, ThirteenView.this.position, view.getId());
            }
        });
        this.btn_swap.setOnClickListener(new View.OnClickListener() {
            /* class com.androidx.p013lv.invention.view.ThirteenView.View$OnClickListenerC11832 */

            public void onClick(View view) {
                ThirteenView.this.onInventionType.onClick(ThirteenView.this.inventionBean, ThirteenView.this.position, view.getId());
            }
        });
        setRecycler();
    }

    /* access modifiers changed from: package-private */
    public void setRecycler() {
        this.recycler.setLayoutManager(new GridLayoutManager(this.context, 2));
        AdapterInvention adapterInvention = new AdapterInvention(this.fragment, this.inventionBean.getVideoList());
        this.adapter = adapterInvention;
        adapterInvention.setDomain(this.domain);
        this.recycler.setAdapter(this.adapter);
        this.adapter.setItemListener(new ItemClickListener() {
            /* class com.androidx.p013lv.invention.view.ThirteenView.C11843 */

            @Override // com.androidx.p013lv.base.listener.ItemClickListener
            public void onItemClick(View view, int i) {
                ((LazyFragment) ThirteenView.this.fragment).startVideoPlay(((VideoBean) ThirteenView.this.adapter.getDataInPosition(i)).getVideoId());
            }
        });
    }
}
